package com.suncaper.han_yi_system.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Builder;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 批次表实体类
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("batch")
public class Batch {

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 学年
     */
    private Integer academicYear;

    /**
     * 困难等级
     */
    private Byte difficultyLevel;

    /**
     * 申请开始时间
     */
    private LocalDateTime applyStart;

    /**
     * 申请截止时间
     */
    private LocalDateTime applyDeadline;

    /**
     * 注册截止时间
     */
    private LocalDateTime registerDeadline;

    /**
     * 逻辑删除（0:未删除，1:已删除）
     */
    @TableLogic
    private Byte isDeleted;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;
}
